import React, {Component} from 'react'
import { Link } from 'react-router-dom';

class News9 extends Component {
    constructor(props) {
        super(props);
        this.state = { 
            list: [
                {
                    aid: 111, 
                    title: "我是新闻111"
                },{
                    aid: 222, 
                    title: "我是新闻222"
                },{
                    aid: 333, 
                    title: "我是新闻333"
                },{
                    aid: 444, 
                    title: "我是新闻444"
                },
            ]
         };
    }
    render() {
        return (
            <div>
                我是新闻组件  
                <ul>
                    {
                        this.state.list.map((value, key) => {
                            return (
                                <li key={key}>
                                    <Link to={`/content/${value.aid}`}>{value.title}</Link>    
                                </li>
                            )
                        })
                    }
                </ul>
            </div>
        );
    }
}

export default News9;